import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString } from 'class-validator';

export class CreateTokenDto {
  @ApiProperty({
    description: '用户uuid',
    example: '1eb1d635-35b7-49a7-b3b1-f78e40e164d5',
    type: 'string',
    required: true,
  })
  @IsNotEmpty({ message: '用户uuid必填' })
  @IsString()
  userId: string;

  @ApiProperty({
    description: '用户token',
    example: 'jwt token',
    type: 'string',
    required: true,
  })
  @IsNotEmpty({ message: '用户token必填' })
  @IsString()
  token: string;
}
